<?php

namespace DesignNew\Prototype;

require('../vendor/autoload.php');
/**
 * 生产房门的工厂
 */
class ProClient{

    public function __construct()
    {
        $this->run();
    }

    public function run()
    {
        $original = new Sheep('Jolly');
        echo $original->getName();
        echo $original->getCateory();

        $cloned = clone $original;
        $cloned->setName('Dolly');
        echo $cloned->getName();
        echo $cloned->getCateory();
    }
}

$client = new ProClient();